<% votes = @fragment.vote_statistical %>
<%
   if @fragment.merge == Fragment::FRAGMENT_MERGE
%>
    <div><h5>该片段已被并入<%= link_to @fragment.novel.title,:controller=>"novel", :action=>"show", :id=>@fragment.novel %></h5></div>
<%
   else
%>
    <div>
        <p>
            <%= link_to_vote @fragment, "精彩", Vote::FRAGMENT_VOTE_GOOD -%>
            <a href="xx"><span id='<%= @fragment.id.to_s+"_level_"+Vote::FRAGMENT_VOTE_GOOD.to_s %>'> <%= votes[0] -%></span></a>
            <%= link_to_vote @fragment, "一般", Vote::FRAGMENT_VOTE_BAD -%>
            <a href="xx"><span id='<%= @fragment.id.to_s+"_level_"+Vote::FRAGMENT_VOTE_BAD.to_s %>'> <%= votes[1] -%></span></a>
            <%= link_to_vote @fragment, "糟糕", Vote::FRAGMENT_VOTE_MORE_BAD -%>
            <a href="xx"><span id='<%= @fragment.id.to_s+"_level_"+Vote::FRAGMENT_VOTE_MORE_BAD.to_s %>'> <%= votes[2] -%></span></a>
        </p>

        <p>
            <!--Only show this link when novel creator is the login user.-->
            <%= show_merge_link @fragment, votes %>
        </p>
    </div>
<%
   end
%>
<!--This div will popup when vote-->
<div id="vote_dialog" title="Vote" style="display:none;text-align:left;">
	<p style="margin:2px;">Comment</p>
	<textarea id="vote_comment" rows="8" cols="60" style="overflow:hidden;"></textarea>
</div>

